package com.ichina.chat.dao;

import java.util.List;
import com.ichina.chat.util.Page;
import com.ichina.chat.vo.Robot;

public interface RobotDao {

	/**
	 * 添加一条记录
	 * @param robot
	 * @return
	 * @throws Exception
	 */
	public boolean addRobot(Robot robot)throws Exception;
	/**
	 * 删除记录
	 * @param rid
	 * @return
	 * @throws Exception
	 */
	public boolean delRobot(int rid)throws Exception;
	/**
	 * 修改记录
	 * @param robot
	 * @return
	 * @throws Exception
	 */
	public boolean updateRobot(Robot robot)throws Exception;
	/**
	 * 查询所有
	 * @param keyCode
	 * @param page
	 * @param typeid
	 * @return
	 * @throws Exception
	 */
	public List<Robot> getAll(String keyCode,Page page,int typeid)throws Exception;
	
	/**
	 * 根据提问得到答案
	 * @param keyCode
	 * @return 查出的结果
	 * @throws Exception
	 */
	public List<Robot> getAnswer(String keyCode,int typeid)throws Exception; 
	/**
	 * 得到条数
	 * @param keyCode
	 * @return
	 * @throws Exception
	 */
	public int getCount(String keyCode)throws Exception;
}
